﻿
//发送请求
function LoadPost() {
    $.post(
        "/GateService/result.aspx", { code: g_langID },
         function (data) {


             if (data != "0") {
                 Fillzone(data)

             } else {
                 if (g_langID == 1033) {

                     alert("Net Error");
                 } else {
                     alert("网络连接异常");
                 }
             }


         }
        );
}
//填充
function Fillzone(data) {

    var sT = "<li><span>";

    var eN = "</span></li><li><img src=";

    var last1N = "/en/images/icon_vote_"
    var last2N = ".gif height='10'  width='";

    var last3N = "'/></li>";

    var lastHtml = "";
    var newdata = data.split('|');
    var tst = 0;
    var st = 0;
    for (var i = 0; i < newdata.length; i++) {
        var thtml = newdata[i].toString();
        var sstr = "";
        if (g_langID == 1033) {

            sstr = "V";
        } else {
        sstr = '票';
    }
        st = parseInt(thtml.substring(thtml.indexOf(',') + 1, thtml.indexOf(sstr)));
        lastHtml += sT + thtml + eN + last1N + (i + 1) + last2N + st + last3N;
        tst += st;

    }

    document.getElementById("ts").innerHTML = tst.toString();
    document.getElementById("FillZone").innerHTML = lastHtml;
}